--[[
  class: UI.Event

  UI event callback(s).
]]


--[[
  event: OnRoundStart

  --- Lua
  function UI.Event:OnRoundStart ()
  ---

  Called when the new round is initialized.

  Access: Write-Only::
]]


--[[
  event: OnSpawn

  --- Lua
  function UI.Event:OnSpawn ()
  ---

  Called when the client is (re)spawned.

  Access: Write-Only::
]]


--[[
  event: OnKilled

  --- Lua
  function UI.Event:OnKilled ()
  ---

  Called when the client is killed.

  Access: Write-Only::
]]


--[[
  event: OnInput

  --- Lua
  function UI.Event:OnInput (inputs)
  ---

  Called when the client is holding/pressing one or more <UI.KEY> keys.

  Access: Write-Only::

  Parameters:
    inputs - (*table / <~Virtual Table.UIKeyState>*) The key states table.
]]


--[[
  event: OnUpdate

  --- Lua
  function UI.Event:OnUpdate (time)
  ---

  Called every frames.

  Access: Write-Only::

  Warnings:
    - Cause client-side lagging if expensive calculations are running in this event.

  Parameters:
    time - (*number*) The game time, updated each time UI is being (re)drawn.

  See Also:
    - <UI.GetTime>
]]


--[[
  event: OnChat

  --- Lua
  function UI.Event:OnChat (text)
  ---

  Called when the client entered a chat message.

  Access: Write-Only::

  Notes:
    - The entered chat message will be using the final message (ie. censored text if contains blacklisted words).

  Parameters:
    text - (*string*) The chat message appeared in chat box.
]]


--[[
  event: OnSignal

  --- Lua
  function UI.Event:OnSignal (signal)
  ---

  Called when the client received a signal from server via <Game.Player.Signal>.

  Access: Write-Only::

  Parameters:
    signal - (*8-bit unsigned int*) The received value.
]]


--[[
  event: OnKeyDown

  --- Lua
  function UI.Event:OnKeyDown (inputs)
  ---

  Called when the client is presses one or more <UI.KEY> keys.

  Access: Write-Only::

  Notes:
    - This event usage is treated as same as <UI.Event.OnInput>.

  Parameters:
    inputs - (*table / <~Virtual Table.UIKeyState>*) The key states table.
]]


--[[
  event: OnKeyUp

  --- Lua
  function UI.Event:OnKeyUp (inputs)
  ---

  Called when the client is releases one or more <UI.KEY> keys.

  Access: Write-Only::

  Notes:
    - This event usage is treated as same as <UI.Event.OnInput>.

  Parameters:
    inputs - (*table / <~Virtual Table.UIKeyState>*) The key states table.
]]

